package com.baide.sanguanheyi.swing;

import com.baide.sanguanheyi.sqlite.ContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * 当初始化完成时，直接执行代码，启动ct客户端，监听称重机485，启动obr和plc 的server
 * 并 设置回调
 *
 * @author 隔壁老王
 */
@Component
public class AfterServiceStarted implements ApplicationRunner {
    @Autowired
    TableFrame tableFrame;
    @Autowired
    ContentService service;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        service.deleteByTimeLessThan();
    }
}
